package com.example.serviceImpl;

import com.example.bean.User;
import com.example.mapper.UserMapper;
import com.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    public User selectUserById(int userId) {
        return userMapper.selectUserById(userId);
    }

    public List<User> selectUserAll() {
        return userMapper.selectUserAll();
    }

    public int insertUser(User user) {
        return userMapper.insertUser(user);
    }

    public int deleteUser(int userId) {
        return userMapper.deleteUser(userId);
    }

    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }
}
